package com.h3c.nem.task;

import com.h3c.nem.service.ITbOfferWorkerService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@JobHandler(value = "mailToLeaderWhenJoin")
public class MailToLeaderWhenJoin extends IJobHandler {

    @Resource
    private ITbOfferWorkerService tbOfferWorkerService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log("XXL-JOB, mailToLeaderWhenJoin.");
        tbOfferWorkerService.mailToLeaderWhenJoin();
        return SUCCESS;
    }
}
